<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>学生成绩管理</title>
    <script>
        var numberOfPeople = prompt('请输入班级人数');
        var sum = 0;
        for (var i = 1; i <= numberOfPeople; i++) {
            var socre = prompt('请输入第' + i + '个学生成绩');
            sum += socre;
        }
        alert('班级平均分:' + (sum / numberOfPeople))
    </script>
</head>

<body>

</body>

</html>